Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next

Agreed

Some of the *magic* answers coming out of blogs imply the existence of knowledge that I can't find documented anywhere.

Stephan Wissel kindly noted that you cannot get the stream at all in the afterRender event, as the Domino server will have automatically enabled the Writer, and as you can only have EITHER stream OR writer active, streams are not available in the afterRender event.

I am continuing the hunt though by checking other events =)

1) No getResponseStream()
First test seems to show that facesContext.getResponseStream() has not been implemented at all.

I tried the following fragment in all events, one at a time.

print("start");
var rs = facesContext.getResponseStream();
if(rs == null) {
print("fc.getResponseStream() == null");
} else {
print(rs.getClass().getName());
}
print("end")

This prints fce.getResponseStream() == null, in all events. I don't know if this is broken or 'working as intended'

2) Getting output stream from the Response object breaks the xpage.

print("start");
var ex = facesContext.getExternalContext();
var response = ex.getResponse();
var rs = response.getOutputStream();
if(rs == null) {
print("response.getOutputStream() == null");
} else {
print(rs.getClass().getName());
}
print("end")

As you predicted, the getOutputStream() fails on the afterRenderResponse() event. On all other events I see the following:

10/05/2009 19:02:25 HTTP JVM: start
10/05/2009 19:02:25 HTTP JVM: com.ibm.xsp.webapp.XspHttpServletResponse$InternalOutputStream
10/05/2009 19:02:25 HTTP JVM: end
10/05/2009 19:02:25 HTTP JVM: SEVERE: CLFAD####E: Exception thrown
10/05/2009 19:02:25 HTTP JVM: SEVERE: CLFAD####E: Exception occurred servicing request for: /test/TestCharts.nsf/test.xsp - HTTP Code: 500
10/05/2009 19:02:25 HTTP Web Server: Command Not Handled Exception [/test/TestCharts.nsf/test.xsp]


My current theory?

The Domino server expects to get access to the Writer object, if you access the Stream object the Writer is disabled and when Domino tries to get it, instead of failing gracefully, it croaks and sends a 500 response.

There may be a magic call to stop Domino doing that but there's no doco. I will hunt through JSF stuff maybe.

S


Feedback response number WEBB7RX2TJ created by ~George Chugeroveroden on 05/11/2009

XPages and Java (~George Chugero... 6.May.09)
. . I don't think you can get both a wr... (~Ted Xanjumilyo... 7.May.09)
. . . . No joy (~George Chugero... 8.May.09)
. . . . . . It's sad (~Ted Xanjumilyo... 10.May.09)
. . . . . . . . Agreed (~George Chugero... 11.May.09)
. . . . . . . . . . In case this isn't totally buried..... (~George Chugero... 12.May.09)
. . . . . . . . . . . . Have you a solution? (~Howard Cisluma... 9.Feb.10)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS